package space.xxhui.consumer.service.impl;

import org.springframework.stereotype.Service;
import space.xxhui.consumer.service.WordFreqService;
import org.apache.spark.rdd.RDD;

/**
 * @author HitvzByHui
 * date 2022-04-05
 */
@Service
public class WordFreqServiceImpl implements WordFreqService {


    @Override
    public boolean save(RDD rdd) {
        if(rdd.isEmpty()){
            return true;
        }
        rdd.foreachPartition((partitionRecords)->{

            return partitionRecords;
        });
        return true;
    }
}
